﻿<Window x:Class="BAC.CRMService.UI.Engine.ConnectionSelectorWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="" Height="363" Width="556" ShowInTaskbar="False"
        DataContext="{Binding RelativeSource={RelativeSource Self}}">
    <Grid Background="#FFE9EDF1" Margin="0,0,0,0">
        <StackPanel Height="60" Margin="0,0,0,0" VerticalAlignment="Top" Background="White">
            <Label Margin="8,0,0,0" Content="Connection selection" FontSize="14"/>
            <Label Margin="8,0,0,0" Content="Select or create a new connection" FontSize="11"/>
        </StackPanel>
        <ListView Name="lvConnections"  Margin="10,65,10,46" ItemsSource="{Binding ConnectionCollection}" MouseDoubleClick="LvConnectionsMouseDoubleClick">
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="Name" Width="200" DisplayMemberBinding="{Binding Name}" />
                    <GridViewColumn Header="Server" Width="150" DisplayMemberBinding="{Binding Server}" />
                    <GridViewColumn Header="Organization" Width="150" DisplayMemberBinding="{Binding Organization}"/>
                </GridView>
            </ListView.View>
        </ListView>
        <Button Content="Create new connection" HorizontalAlignment="Left" Margin="10,0,0,9" Width="130" Height="22" VerticalAlignment="Bottom" Click="CreateButtonClick"/>
        <Button Content="Cancel" Margin="0,0,10,9" Height="22" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="75"  Click="CancelButtonClick"/>
        <Button Content="OK" Margin="0,0,90,9" Height="22" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="75" RenderTransformOrigin="-0.227,0.682"  Click="ValidateButtonClick"/>
    </Grid>
</Window>
